home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1 / sys / msdos / exesmurf.doc < prev    next >
Encoding:
Text File  |  1993-01-18  |  4.9 KB  |  98 lines

  1.     SCCS Id: @(#)exesmurf.doc     3.1        91/01/29
  2.         Copyright (c) Pierre Martineau and Stephen Spackman 1991, 1992, 1993.
  3.         NetHack may be freely redistributed.  See license for details.
  4.              ============================
  5.              PC NetHack Support Utilities
  6.              ============================
  7.              Last revision: 1991January29
  8.  
  9. This file contains documentation for the NetHack MS-DOS support
  10. utility EXESMURF.EXE.  This utility examines and modifies the load
  11. parameters of an .EXE file and can be used to split .OVL files off a
  12. monolithic overlaid executable using ovlmgr.
  13.  
  14. EXESMURF
  15. --------
  16. exesmurf FILENAME[.EXT] /v
  17. exesmurf FILENAME[.EXT] /minN
  18. exesmurf FILENAME[.EXT] /maxN
  19. exesmurf FILENAME[.EXT] /l
  20. exesmurf FILENAME[.EXT] N... [/pPATTERN]
  21.  
  22. The programme exesmurf is basically a reimplementation of Microsoft's
  23. EXEMOD utility.  However, this incarnation is one that is
  24. "overlay-aware" (as they say).  It will provide the user with
  25. information about the executable and its overlays, and allow you to
  26. modify the executable's parameters and overlay locations.
  27.  
  28. This program is made available for all users who were not graced with a
  29. release of EXEMOD in their Microsoft product, or who need the
  30. additional functionality it provides.
  31.  
  32. /v.
  33. If exesmurf is invoked with a filename as argument, optionally
  34. followed by a /v, the filename's exeheader is listed for your viewing
  35. pleasure, along with the headers of any Microsoft-format overlays the
  36. file may contain.  The listing is verbose; if there are many overlays
  37. you will want to redirect the output.  Note that the redundancy in the
  38. output listing largely reflects redundancy in the file structure.
  39.  
  40. /minN, /maxN, /stackN.
  41. Exesmurf may also be used to modify the "minalloc", "maxalloc" and
  42. "stack" allocation parameters of the executable file.  This can be
  43. accomplished with the /min, /max, and /stack flags respectively.  Any
  44. arguments to these flags should be *immediately* followed by a decimal
  45. number N.  Note that this is inconsistent with the arguments to EXEMOD
  46. which takes hex numbers, and *needs* a space between the flag and the
  47. number.
  48.  
  49. /l.
  50. The /l option requests a version of the /v listing (see above) in
  51. which the information about overlays is very much compressed; only
  52. their decimal file and load sizes are given, in a multi-column format.
  53. The resulting display will generally fit on a single screen.  This
  54. turns out to be very useful when contemplating appropriate parameters
  55. for the overlay splitting operation described next.
  56.  
  57. N... [/pPATTERN].
  58. The overlay-unpacking function of exesmurf is invoked by following the
  59. filename argument by a sequence of decimal numbers.  Each of these
  60. numbers is an overlay number at which a new external overlay file is
  61. to be started.  The main executable file will keep its old name after
  62. the overlays have been unloaded; the original input file will be
  63. retained, with its extension changed to .BAK.  By default, the output
  64. files will be derived from the input file name by appending a
  65. discriminating character (in sequence, 0, 1, ..., 9, a, b, ..., z) to
  66. the basename and changing the extension to .OVL; but if the basename
  67. is a full 8 characters long, the discriminating character will replace
  68. the last character instead.  This default is chosen for compatibility
  69. with ovlmgr.  The default may be overridden with the /p option, which
  70. specifies a file PATTERN - a file name, possibly complete with
  71. extension, containing one or more ? characters (* is not allowed),
  72. which will be replaced by discriminating characters.  If there is
  73. exactly one questionmark, it will be replaced by a digit or letter in
  74. the sequence described above, but if more than one questionmark
  75. appears a decimal numbering scheme is used instead.
  76.     Note that the numeric arguments are overlay numbers, not
  77. indices, and they indicate the starting overlays of files.  This
  78. permits us to manipulate files in which (for some reason) the overlays
  79. are not stored in ascending order, but it does mean that if a
  80. mentioned overlay does not exist in the original file, no new overlay
  81. file will be started.  This is a realistic risk, since the Microsoft
  82. linker does not seem to generate overlays at all if there is no actual
  83. code generated into the segments in question.
  84.     Note further that this operation can be reversed with the DOS
  85. copy/b operation, always supposing that it works as documented in your
  86. release of the operating system: the overlays are simply moved
  87. page-by-page to the external files.
  88.     No guarantees are made as to how this programme will behave if
  89. there is debug information or other strangeness stored after the last
  90. overlay in the file.
  91.  
  92. Whenever exesmurf is invoked, the extension .EXE is assumed for the
  93. file if no extension is given.  Other extensions are probably only
  94. meaningful for examining overlay files.
  95. ----------------------------------------------------------------------
  96. Stephen P Spackman                       stephen@estragon.uchicago.edu
  97. ----------------------------------------------------------------------
  98.